[broadway] Set transient-for before showing window
authorAlexander Larsson <alexl@redhat.com>
Mon, 11 Apr 2011 08:46:48 +0000 (10:46 +0200)
committerAlexander Larsson <alexl@redhat.com>
Mon, 11 Apr 2011 10:09:43 +0000 (12:09 +0200)
When syncing windows, make sure we set transient-for before showing
the window to avoid it being visible with the wrong transient-for
(i.e. possibly on the wrong browser window).

gdk/broadway/gdkwindow-broadway.c

index c00fbe981cb3e0290fbcdc4db42309e288fbd1b4..fd663a1d2ee49452f6303db2a6573159a94649e3 100644 (file)
@@ -227,15 +227,13 @@ _gdk_broadway_resync_windows (void)
                                   window->width,
                                   window->height,
                                   window->window_type == GDK_WINDOW_TEMP);
+      if (impl->transient_for)
+       broadway_output_set_transient_for (display->output, impl->id, impl->transient_for);
       if (GDK_WINDOW_IS_MAPPED (window))
        {
          broadway_output_show_surface (display->output, impl->id);
          window_data_send (display->output, impl);
        }
-      if (impl->transient_for)
-       {
-         broadway_output_set_transient_for (display->output, impl->id, impl->transient_for);
-       }
     }
 
   gdk_display_flush (GDK_DISPLAY (display));